package my.study.javapuzzles;

public class Puzzle1 {

	/**
	 *  定义：(a / b) * b + (a % b) == a 
	 *  当a是负奇数的时候，a % 2 == - 1
	 */
	public static void main(String[] args) {
		for (int i = -10; i < 10; i++) {
			//System.out.println(i + "is to charge!");
			if (isOdd(i)) {
				System.out.println(i + "is odd!");
			}
			else {
				System.out.println(i + "is not odd!");
			}
		}
	}

	public static boolean isOdd(int i) {
		return i % 2 == 1;
		//return i % 2 != 0;
	}
}
